home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 September
/
Macworld (1997-09).dmg
/
Shareware World
/
Utilities
/
Text Processing
/
Alpha
/
Tcl
/
ElectricAlias
/
Aliases
/
aliases.Awk
< prev
next >
Wrap
Text File
|
1994-06-18
|
2KB
|
36 lines
# FILE: aliases.Awk
#
# DESC: Aliases for Awk mode
#
# LAST UPDATE: 01/06/93 5:32:02 AM
electricAlias-def •Awk •Awk •Awk
electricAlias-var Awk bb "\{"
electricAlias-var Awk eb "\}"
electricAlias-var Awk bc "#"
electricAlias-var Awk ec ""
electricAlias-def •Awk #! "§«askalias {File name} NAME»#! /bin/nawk -f\r#\r# §{NAME}•\r\r•"
electricAlias-def •Awk BEGIN "BEGIN \{\r\t•\r\}§{bc}end BEGIN§{ec}•"
electricAlias-def •Awk END "END \{\r\t•\r\}§{bc}end END§{ec}•"
electricAlias-def •Awk function "§«askalias {function name} NAME»§{sep}function §{NAME}(•) \{\r\t•\r\}§{bc}endfunction §{NAME}§{ec}\r\r•"
electricAlias-def •Awk \{ "\{\r\t•\r\}•"
electricAlias-def •Awk do "do \{\r\t•\r\} while (•);•"
electricAlias-def •Awk for "for (•;•;•) \{\r\t•\r\}§{bc}endfor§{ec}•"
electricAlias-def •Awk foreach "for (• in •) \{\r\t•\r\}§{bc}endforeach§{ec}•"
electricAlias-def •Awk while "while (•) \{\r\t•\r\}§{bc}endwhile§{ec}•"
electricAlias-def •Awk if "if (•) \{\r\t•\r\}§{bc}endif§{ec}•"
electricAlias-def •Awk elseif "\b\} else if (•) \{\r•"
electricAlias-def •Awk else "\b\} else \{\r•"
electricAlias-def •Awk forever "while (1) \{ §{bc}forever§{ec}\r\t•\r\}§{bc}endforever§{ec}•"
electricAlias-def •Awk readfile "§«askalias {File name} NAME»lastno = Complete(LineCount(§{NAME}_path),0);
§{NAME}_file = fopen(§{NAME}_path,\"r\");
while (1) {
line = fgetline(§{NAME}_file);
if (feof(§{NAME}_file)) break;
Complete(++lineno,lastno);
•
}#endwhile 1
fclose(§{NAME}_file);•"
# electricAlias-def Awk "=" "§«askalias \"Assignment or test?\" eq {=} Insert {==} {=}»§{eq}"